1 Time Series 7-Day Forecasting with XGBoost individual countries

1.1 Contents

1.2 Imports

1.3 Functions

1.3.1 Functions: feature_list

1.3.2 Functions: split_sequences

1.3.3 Functions: plot_actual_predicted

1.3.4 Functions: split_sequence_features

1.3.5 Functions: rmse_y_y_pred

1.3.6 Functions: rmse_y_y_pred_country

1.4 Load data

1.5 Preprocessing

1.5.1 Preprocessing: get feature and target for model training and testing with cross-validation

1.5.2 Preprocessing: scale feature and target variables

1.5.3 Preprocessing: get feature names

1.6 XGBoost model

1.6.1 Organize and evaluate model performance: train set

1.6.2 Organize and evaluate model performance: validation set

1.6.3 Organize and evaluate model performance: test set

1.6.4 Train and test the XGBoost model

1.7 Save and plot model performance

1.7.1 Save data

1.7.2 Plot model performance

1.7.3 Visualize the tree

1.7.4 Visualize feature importance